#ifndef TEACHER_H
#define TEACHER_H

#include <QTableView>
#include <QSqlDatabase>
#include <QSqlTableModel>
#include <QMap>
#include <QSqlRecord>
#include <QHeaderView>
#include <QDebug>
#include <QAction>
#include "teacherin.h"
class teacher : public QTableView
{
    Q_OBJECT
public:
    teacher(QWidget *parent = 0);
    
public slots:
    void add();
    void edithandler();
private:
    QSqlDatabase conn;
    QSqlTableModel * model;
    QHeaderView * header;
    QAction * actedit;
    void initdb();
    void initheader();
};

#endif // TEACHER_H
